var mysql = require("mysql");
// const config = {
//     host: "172.17.26.232",
//     user: "shopping-mall",
//     password: "root",
//     database: "online-shopping-mall",
// };
//王方华本地数据库
// const config = {
//   host: '172.17.26.226',
//   user: 'root',
//   password: 'root',
//   database: 'online-shopping-mall'
// }

// const config = {
//   host: 'localhost',
//   user: 'root',
//   password: 'root',
//   database: 'online-shopping-mall'
// }
//服务器数据库
const config = {
    host: "106.75.78.91",
    user: "shopping-mall",
    password: "root",
    database: "shopping-mall",
}

var db = mysql.createConnection(config)

module.exports = db
